/**
 * 所有请求后台的接口
 * 
 */

import { ajax } from "./ajax";

/**
 * 注册
 * @param {} param0 
 * @returns 
 */
 export const reqRegister = (user) => ajax("/auth/register", user, "POST");

/**
 * 登陆
 * @param {} param0 
 * @returns 
 */
export const reqLogin = ({ userName, password }) => ajax("/auth/login", { userName, password }, "POST");

/**
 * 登陆
 * @param {} param0 
 * @returns 
 */
 export const reqAutoLogin = (token) => ajax("/auth/autoLogin", { token }, "GET");
 